/**
 * @file styles/controllers/grid/grid.less
 *
 * Copyright (c) 2013-2014 Simon Fraser University Library
 * Copyright (c) 2003-2014 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @ingroup pkp_controllers_grid
 *
 * @brief Classes for grid structure
 */

div.pkp_controllers_grid {

	margin-top: 20px;

	div.actions {
		margin-top: 10px;
	}

	table {
		width: 100%;
	}

	thead, tr.gridRow td, tr.row_controls td, tr.category, .empty td {
		border-bottom: 1px solid #c8c7c7;
	}
	
	tr.gridRow td {
		height: 40px;
	}
	
	tr.category {
		border-top: 1px solid #c8c7c7;
	}

	.empty td {
		padding-left: 10px;
		text-align: left;
		height: 40px;
	}
	
	thead tr {
		height: 30px; /* Must be set for tr rather than th for Chromium. */
		padding: 4px 0;
	}

	thead th {
		padding: 0 4px; /* Padding top/bottom must be 0 for IE7 compatibility. */
		vertical-align: middle;
		text-align: center;
	}

	thead th:first-child {
		padding-left: 40px;
	}

	td {
		text-align: center;
		font-size: 12px;
		vertical-align: middle;
		padding: 0px;
	}

	th:first-child, td:first-child, td.first_column, .category_grid_body td:first-child + td {
		text-align: left !important;
	}

	td.first_column {
		padding: 0 !important;
	}
	
	td.category {
		display: table-row;
	}
	
	tr.no_border, td.no_border {
		border: none !important;
	}
	
	.default_category_style td {
		font-size: 120%;
		text-transform: uppercase;
		font-family: "Courier New", Courier, mono;
	}

	tr.category td.no_actions {
		top: 0;
		padding-left: 10px !important;
	}
	
	.wrapper {
		margin-bottom:30px;
	}
	
	.grid_header .pkp_grid_description {
		font-family: Arial, Helvetica, sans-serif;
		padding:10px;
	}
	
	.grid_header_bar {
		background-color: #f7f5f4;
		padding: 5px 10px 5px 0px;
	}
	
	.grid_header_bar h3 {
		display:inline;
		padding: 0px 0px 0px 10px;
		vertical-align:middle;
		line-height: 24px;
	}
	
	.grid_header_bar a {
		float:left;
	}

	.options {
		float: right;
		line-height: 24px;
		height: 24px;
		vertical-align: middle;
	}

	.options a {
		font-size: 90%;
	}

	.options a:before {
		margin-left: 20px;
	}

	.hidetext {
		visibility: hidden;
		overflow: hidden;
	}

	.row_container {
		position: relative; /* Required to anchor absolute row actions positioning below. */
		padding: 0px 20px 0px 50px;
		overflow: hidden;
		height: 40px;
	}

	.row_container .row_actions {
		position: absolute;
		width: 40px;
		height: 40px;
	}

	.row_actions {
		top: 0;
		left: 0;
	}

	.row_actions a {
		display: block;
		cursor: pointer;
		float: left; /* Need this for Chrome to render links correctly. */
	}
	
	.row_actions a:before {
		margin: 8px;
	}

	.row_file {
		width: 100%;
		top: 50%;
		line-height: 24px;
		margin-top: 0.5em;
	}

	.row_file a.pkp_controllers_linkAction {
		margin-right: 20px;
	}

	.multiline {
		line-height: 125%; /* IE7 doesn't support "inherit", all other browsers will ignore this. */
		line-height: inherit;
	}

	.row_controls {
		display: none;
	}

	.row_controls td {
		padding-left: 48px;
		padding-top: 5px; 
		line-height: 25px;
		height: 25px;
	}
	
	.category_controls td {
		padding-left: 9px;
	}
	
	.row_controls td.indent_row {
		padding-left: 0px;
	}

	.row_controls a {
		float:left;
		margin-right: 20px;
		text-decoration: none;
		color: #777;
		font-size: 90%;
	}
	
	
	.row_controls a:hover {
		text-decoration: underline;
	}

	a.focus {
		background-position: 0 bottom;
	}

	a.task {
		width: 100%;
		min-height: 40px;
		text-indent: -1500px;
		overflow: hidden;
		display: block;
		background-position: 50% 50%;
		background-repeat: no-repeat;
		margin: 0;
	}
	
	.grid_link_actions_below a {
		font-size: 11px;
	}

	/* Below was taken from the theme */

	table {
		background-color: #fff;
		border-collapse: collapse; /* Required for IE7 to remove table borders. */
	}

	tr.alternate_row, tr.alternate_row .row_file {
		background-color: #f5f5f5;
	}

	th {
		color: #20538d;
	}

	/* FIXME: This should go somewhere else. */
	a.task:hover {
		background-color: #efefef;
	}

	.ui-widget {
		font-size: .9em;
	}


	/* @group More/Less Detail Toggle */
	.toggleDetailContainer {
		margin: 20px 0 20px 0;
	}

	.toggleDetail {
		display: block;
		text-indent: -99999px;
		overflow: hidden;
		background-repeat: no-repeat;
		width: 16px;
		height: 16px;
		background-image: url(../lib/pkp/styles/images/ui-icons_222222_256x240.png);
	}

	.moreDetail {
		background-position: -48px -192px;
	}

	.lessDetail {
		background-position: -64px -192px;
	}

	.visible {
		display: block;
	}
	
	.grid_controls {
 		padding: 5px;
 		height:26px;
	}
	
	.ordering:hover {
		background: #EAF3F8 !important;  
	}
	
	.indent_row {
		width: 40px;
	}
	
	tbody .ui-sortable-placeholder {
		display: block;
		visibility: visible !important;
		height: 40px;
		background-color: #EAF3F8 !important;
	}
	
	tbody.ui-sortable-helper {
		display:table;
	}
	
	.gridCellContainer {
		.gridLabelBeforeActions {
			margin-right: 20px;
		}
	}
}
